<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
	<title></title>
	<link rel="stylesheet" href="http://127.0.0.1/my/wasai/Static/bootstrap/css/bootstrap.min.css" />
	<link rel="stylesheet" type="text/css" href="http://127.0.0.1/my/wasai/Static/hdjs/hdjs.css"/>
	
	<style type="text/css">
		body{
			margin-bottom: 100px;
			font-family: "微软雅黑";
		}
	</style>
</head>
<body>
	<div class="container-fluid">
	<div class="row-fluid">
	<div class="span12">

	<table class="table table-bordered table-hover">
		<tr style="background: #F5F5F5;">
			<th>货品ID</th>
			<?php foreach ($spec as $kk=>$vv){?>
			  <th><?php echo $vv['taname'];?></th>
			<?php }?>
			<th>库存</th>
			<th style="width: 200px;">货号</th>
			<th>操作</th>
		</tr>
		<?php foreach ($da as $k=>$v){?>
		    <tr style="background: #CEE6FE;font-size: 14px;">
		    	    
					<th><?php echo $v['glid'];?></th>
					<?php foreach ($v['combine'] as $ke=>$va){?>
						<th><?php echo $va;?></th>
					<?php }?>
					<th><?php echo $v['number'];?></th>
					<th><?php echo $v['inventory'];?></th>
					<th>
					    <a href="<?php echo U('Admin/Goodslist/edit',array('glid'=>$v['glid'],'gid'=>$v['gid']));?>" class="btn btn-warning"><i class="icon-pencil icon-white"></i>修改</a>
						<a href="<?php echo U('Admin/Goodslist/del',array('glid'=>$v['glid']));?>" class="btn btn-danger"><i class="icon-trash icon-white"></i>删除</a>
					</th>
			</tr>
		<?php }?>
		<form action="" method="post">
			<tr style="background: #CEE6FE;">
				<th>添加货品</th>
				<?php foreach ($spec as $k=>$v){?>
					
					<th style="width: 200px;">
						<select name="spec[]">
							<option value="0">--请选择--</option>
							<?php foreach ($v['opt'] as $ke=>$va){?>
							    <option value="<?php echo $va['gtid'];?>"><?php echo $va['gtvalue'];?></option>
							<?php }?>
						</select>
					</th>
				<?php }?>
				
				<th><input type="text" name="number" id="" value="" /></th>
				<th style="width: 200px;"><input type="text" name="inventory" id="" value="" /></th>
				<th></th>
	</table>
            <input type="submit" value="保存添加" class="hd-btn hd-btn-primary" style="width: 70px;height: 50px;"/>
    </form>
	</div>
	</div>
	</div>
</body>
</html>